Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

for docutils < 0.19 use traverse instead of findall #75

Merged
merged 2 commits into from
Jul 28, 2023

Conversation

braingram
Copy link
Contributor

@braingram braingram commented Jul 27, 2023

see the code comment for some details but somehow
the docs build without errors or warnings but the side menu for sphinx-rtd-theme fails to scroll

I think this is a combination of sphinx-asdf, docutils and sphinx-rtd-theme.

Testing locally the changes in this PR appears to fix it for jwst (for the current sphinx-rtd-theme)

Part of the issue here appears to be that sphinx-rtd-theme sets an upper pin on docutils limiting it to <0.19. 0.18.1 was released in December 2021 and contains a bug in findall (which is the recommended replacement for traverse that is deprecated in newer docutils).

Docutils 18.1 has broken findall due to this issue:https://sourceforge.net/p/docutils/bugs/448/ fixed in docutils 19https://sourceforge.net/p/docutils/code/9067/ which incorrectly assigns the first node, which results in adding the bootstrap template from sphinx-asdf to the page. This conflicts with the css from sphinx-rtd-template and results in the broken menu.

I opened a test PR on JWST to see the docs built with the source branch for this PR here:
spacetelescope/jwst#7776
with built docs:
https://jwst-pipeline--7776.org.readthedocs.build/en/7776/

Note that this is impacting jwst, roman and asdf docs which all use sphinx-rtd-theme.

braingram and others added 2 commits July 27, 2023 17:11
see the code comment for some details but somehow
the docs build without errors or warnings but the side
menu for sphinx-rtd-theme fails to scroll
@braingram braingram force-pushed the traverse_for_old_docutils branch from 4817444 to 6aa2a0b Compare July 27, 2023 21:11
@braingram braingram marked this pull request as ready for review July 27, 2023 21:18
@braingram braingram requested review from nden and zacharyburnett July 27, 2023 21:35
Copy link
Contributor

@nden nden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. We should make a release soon so that fixes can be used in downstream packages.

@braingram braingram merged commit 5fddf93 into asdf-format:main Jul 28, 2023
@braingram braingram deleted the traverse_for_old_docutils branch July 28, 2023 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants